#import <UIKit/UIKit.h>

typedef void(^AlertHandler)(NSInteger buttonIndex);

/*===================================================================
 说明：
    对话框
 ==================================================================*/
@interface MRAlert : NSObject

@property (nonatomic) NSUInteger	delaySecond;	//延时秒数
@property (nonatomic, readonly) UIAlertController		*controller;

//对话框
+ (id)alertWithMessage:(NSString *)message;
+ (id)alertWithMessage:(NSString *)message handler:(AlertHandler)handler;
+ (id)alertWithMessage:(NSString *)message other:(NSString *)other handler:(AlertHandler)handler;

+ (id)alertWithTitle:(NSString *)title message:(NSString *)message;
+ (id)alertWithTitle:(NSString *)title message:(NSString *)message handler:(AlertHandler)handler;
+ (id)alertWithTitle:(NSString *)title message:(NSString *)message other:(id)other handler:(AlertHandler)handler;

//延时自动取消对话框（默认10秒后自动取消），message中包含%d用于显示剩余秒数
+ (id)delayAlertWithTitle:(NSString *)title message:(NSString *)message other:(id)other handler:(AlertHandler)handler;

- (void)dismiss;

@end
